<!--
  ~ Copyright 2025 Signal Messenger, LLC
  ~ SPDX-License-Identifier: AGPL-3.0-only
  -->

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <style>
    #container                  { position: absolute; top: 50px; bottom: 0; left: 0; right: 0; }
    #searchBar                  { position: fixed; top: 0; left: 0; width: 350px; display: none; padding: 10px; gap: 5px; z-index: 1; }
    #searchBar input            { flex-grow: 1; padding: 5px ;}
    .searchMatches              { position: absolute; background-color: rgba(182, 190, 250, 0.2); }
    #caseSensitiveButton.active { background-color: rgba(182, 190, 250, 0.2); }
    #matchCount                 { font-size: 10px; }
    #filterLevel                { display: none; }

    .ace_editor  { background-color: #FBFCFF; }
    .ace_none    { color: #000000; }
    .ace_verbose { color: #515151; }
    .ace_debug   { color: #089314; }
    .ace_info    { color: #0a7087; }
    .ace_warning { color: #b58c12; }
    .ace_error   { color: #af0d0a; }

    body.dark .ace_editor  { background-color: #1B1C1F; }
    body.dark .ace_none    { color: #ffffff; }
    body.dark .ace_verbose { color: #8a8a8a; }
    body.dark .ace_debug   { color: #5ca72b; }
    body.dark .ace_info    { color: #46bbb9; }
    body.dark .ace_warning { color: #cdd637; }
    body.dark .ace_error   { color: #ff6b68; }
  </style>
</head>
<body>
  <div id="searchBar">
    <button id="cancelButton"> x </button>
    <input type="text" id="searchInput" placeholder="Search" />
    <button id="prevButton"> < </button>
    <button id="nextButton"> > </button>
    <button id="caseSensitiveButton"> Cc </button>
    <div id="matchCount"> No match </div>
  </div>
  <div id="filterLevel">
    <div class="filterLevelMenu">
      <label><input type="checkbox" value=" V ">Verbose</label>
      <label><input type="checkbox" value=" D ">Debug</label>
      <label><input type="checkbox" value=" I ">Info</label>
      <label><input type="checkbox" value=" W ">Warning</label>
      <label><input type="checkbox" value=" E ">Error</label>
      <label><input type="checkbox" value="SignalUncaughtException">SignalUncaughtException</label>
    </div>
  </div>
  <div id="container">Loading...</div>
  <script src="https://www.unpkg.com/ace-builds@latest/src-noconflict/ace.js"></script>
  <script src="WebView.js"></script>
</body>
</html>